package processes.nMCounterProcess;

import os.MiniProcess;
import os.MiniThread;

public class MCounterThread extends MiniThread
{
	private Counter counter;

	public MCounterThread(MiniProcess process, String tid)
	{
		super(process, tid);
		description = "Mcounter thread";
	}

	@Override
	public void passThreadArguments(Object[] arguments)
	{
		counter = (Counter) arguments[0];
	}

	@Override
	public void run()
	{
		while (true)
		{
			isExcecutionStopped();
			counter.increment();
		}
	}

}
